<?php

namespace App\Admin\Repositories;

use App\Models\ReceiptInfo as Model;
use Dcat\Admin\Repositories\EloquentRepository;

class ReceiptInfo extends EloquentRepository
{
    /**
     * Model.
     *
     * @var string
     */
    protected $eloquentClass = Model::class;

    public static function getInvoiceType($type = null)
    {
        $invoice = [
            '1' => '增值税专用发票',
            '2' => '增值税普通发票',
        ];
        if (!empty($type)) {
            return $invoice[$type];
        }
        return $invoice;
    }

    public static function getTaxType($type = null)
    {
        $invoice = [
            '1' => '纳税人识别号',
            '2' => '统一社会信用代码',
        ];
        if (!empty($type)) {
            return $invoice[$type];
        }
        return $invoice;
    }
}
